﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFCore1
{
  /// <summary>
  /// 通过Data Annotation（以特性方式） 方式配置
  /// </summary>
  [Table("T_Cats")]
  public class Cat
  {
    public int Id { get; set; }
    [Required]
    [MaxLength(22)]
    public string Name { get; set; }

  }
}
